package com.jfirer.validator.descriptor;

import javax.validation.groups.ConvertGroup;
import javax.validation.metadata.GroupConversionDescriptor;

public class GroupConversionDescriptorImpl implements GroupConversionDescriptor
{
	private final Class<?>	from;
	private final Class<?>	to;
	
	public GroupConversionDescriptorImpl(ConvertGroup convertGroup)
	{
		from = convertGroup.from();
		to = convertGroup.to();
	}
	
	public GroupConversionDescriptorImpl(Class<?> from, Class<?> to)
	{
		this.from = from;
		this.to = to;
	}
	
	@Override
	public Class<?> getFrom()
	{
		return from;
	}
	
	@Override
	public Class<?> getTo()
	{
		return to;
	}
	
}
